import api from '@/api/index'
import { userService } from '@/utils/apiConfig'
const apiServer = '/mock/api'
// 登录
export const login = <T>(data?: unknown) => {
  return api.post<T>(userService + '/users/login', data)
}
// 登出
export const loginOut = <T>(data?: unknown) => {
  return api.post<T>(userService + '/users/logout', data)
}
// 获取用户信息
export const getUserInfo = <T>(data?: unknown) => {
  return api.get<T>(userService + '/users/currentUser', data)
}
// 修改密码
export const editPwd = <T>(data?: unknown) => {
  return api.put<T>(userService + '/users/updatePassword', data)
}
